
const defaultState = {
  txt:"test - test - 测试数据",
  flag:true,
  movie:[]
}

export const data = (state=defaultState,action )=>{
  const {type,payload} = action ;

  switch(type){
    case "changeDataTxt":
    return {...state,txt:payload}
    break;

    case "changeDataFlag":
    return {...state,flag:payload}
    break;

    case "changeDataTextAsync":
    return {...state,txt:payload};
    break;

    case "changeDataMovieAsync":
    return {...state,movie:payload}
    break;


    default:
    return state;
    break;
  }
}